#include <iostream>
#include <vector>
using namespace std;
int n,m;
vector<vector<int>> result;
void dfs(int u,int sum,vector<int> v)
{
    if(sum==m){
        result.push_back(v);
        return;
    }
    if(sum>m){
        return;
    }
    for(int i=u+1;i<=n;i++)
    {
        v.push_back(i);
        dfs(i,sum+i,v);
        v.pop_back();
    }
}
int main() {
    cin >> n >> m;
    vector<int> vc;
    for(int i=1;i<=n;i++)
    {
        vc.clear();
        vc.push_back(i);
        dfs(i,i,vc);
    }
    for(int i=0;i<result.size();i++)
    {
        for(int j=0;j<result[i].size();j++)
        {
            cout << result[i][j] << " ";
        }
        cout << endl;
    }
    return 0;
}